package org.moonshiner.ctci.c1.q6;

public class Q6 {
		
	public static void main(String[] args) {
	
		int[][] matrix = new int[4][4];
		
		
		for(int i = 0; i < 4; i++){
			for (int j = 0; j < 4; j++) {
				matrix[i][j] = i+1;
			}
		}
		
		printMatrix(matrix);
		
		System.out.println("\n---------------------\n");
		
		printMatrix(new MatrixRotator().rotate(matrix, 4));
		
	}
	
	public static void printMatrix(int[][] matrix){
		
		for (int i = 0; i < matrix.length; i++) {
			for (int j = 0; j < matrix.length; j++) {
				System.out.print(matrix[i][j]);
			}
			System.out.println();
		}
		
	}

}